package com.xiaocg.singleton;

/**
 * 单例模式--静态内部类
 */
public class StaticInnerClassSingleton {

    private StaticInnerClassSingleton(){

    }

    private  static  class SingletonHolder{
        private static final StaticInnerClassSingleton singleton = new StaticInnerClassSingleton();
    }

    public static StaticInnerClassSingleton getInstance(){
        return SingletonHolder.singleton;
    }
}
